#include <stdio.h>  
  
double sum(int x, int n) {  
    if (x > n)  
        return 0.0;  
    if (x == n || x == -n)  
        return 1.0 / x;  
    double temp =  1.0 / x;  
    if (x > 0)  
        x++;  
    else  
        x--;  
    return sum(-x, n) + temp;  
}  
  
int main() {  
    double ans;  
    int n;  
    if (scanf("%d", &n));  
    if (n == 1)  
        printf("%d\n", 1);  
    else  
        printf("%.6f\n", 1.0 + sum(2, n));  
    return 0;  
}  